home *** CD-ROM | disk | FTP | other *** search
/ BCI NET / BCI NET Dec 94.iso / archives / programming / blitzbasic / blitz-list200994.lha / blitz-list / 000210_blitz-list-request_Tue Aug 16 03:23:10 1994.msg < prev    next >
Internet Message Format  |  1994-09-20  |  2KB

  1. Received: from cix.compulink.co.uk (tom.compulink.co.uk [192.188.69.2]) by kantti.helsinki.fi (8.6.9/8.6.5) with SMTP id DAA22293 for <blitz-list@helsinki.fi>; Tue, 16 Aug 1994 03:21:44 +0300
  2. Received: from gonzales.compulink.co.uk (gonzales.compulink.co.uk [192.188.69.4]) by cix.compulink.co.uk (8.6.9/8.6.9) id BAA06160 for blitz-list@helsinki.fi; Tue, 16 Aug 1994 01:19:58 +0100
  3. Date: Tue, 16 Aug 94 01:22 BST-1
  4. From: gakennedy@cix.compulink.co.uk (Graham Kennedy)
  5. Subject: GTListview Gadgets
  6. To: blitz-list@helsinki.fi
  7. Reply-To: gakennedy@cix.compulink.co.uk
  8. Message-Id: <memo.981459@cix.compulink.co.uk>
  9. MIME-Version: 1.0
  10. Content-Type: text/plain; charset="us-ascii"
  11. Content-Transfer-Encoding: 7bit
  12. X-Status: 
  13. Status: O
  14.  
  15. >Why not do a DIM LIST a.list(0)? Or whatever variable you're using for your list?
  16. WOW, it worked, I think Blitz must be the first Language I have used which
  17. allows you to redim so easily, in fact it was so simple I didn't even think
  18. about this solution. Mucho Thanks for suggesting it.
  19.  
  20. Second bit.
  21. >sample code follows.......
  22. >
  23. >;Main Loop
  24. >Repeat
  25. >
  26. >ev.l=WaitEvent
  27. >gh.l=GadgetHit
  28. >code.l=EventCode
  29. >
  30. >Select ev
  31. >
  32. >    Case $40    ; gadget up event - needed for list views and other gadgets
  33. >
  34. >        Select gh
  35. >
  36. >            Case 52:lv1=code    ;52 is listview gadget # and lv1 holds value
  37. >                                ;of selected item - you can go up and down
  38. >                                ;from there
  39. >
  40. >.......end of sample code
  41.  
  42. I don't think I was too clear in my description :-( I can read the Listview
  43. no problem but I then want to take that value and set the List array pointer
  44. to point to the entry selected. I am currently using something similar to
  45. the following:
  46.  
  47.    ok=firstitem(mylist())
  48.    while(lv1>0)
  49.       ok=nextitem(mylist())
  50.       lv1=lv1-1
  51.    wend
  52.  
  53. therefore at the end of the loop the List array will point at the Listview
  54. entry selected.... Great for small lists, But could take a while on a larger
  55. array. I was just wondering if there was a way to set the pointer directly.
  56.  
  57. many thanks for the assistance Joel, appreciate it.
  58.  
  59.  
  60. Graham K.  
  61.